package com.zscat.mallplus.center.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zscat.mallplus.center.entity.CenterLevel;
import com.zscat.mallplus.center.mapper.CenterLevelMapper;
import com.zscat.mallplus.center.service.ICenterLevelService;

/**
 * 会员等级设置Service业务层处理
 * 
 * @author Wsen
 * @date 2020-09-24
 */
@Service
public class CenterLevelServiceImpl implements ICenterLevelService 
{
    @Autowired
    private CenterLevelMapper centerLevelMapper;

    /**
     * 查询会员等级设置
     * 
     * @param id 会员等级设置ID
     * @return 会员等级设置
     */
    @Override
    public CenterLevel selectCenterLevelById(Long id)
    {
        return centerLevelMapper.selectCenterLevelById(id);
    }

    /**
     * 查询会员等级设置列表
     * 
     * @param centerLevel 会员等级设置
     * @return 会员等级设置
     */
    @Override
    public List<CenterLevel> selectCenterLevelList(CenterLevel centerLevel)
    {
        return centerLevelMapper.selectCenterLevelList(centerLevel);
    }

    /**
     * 新增会员等级设置
     * 
     * @param centerLevel 会员等级设置
     * @return 结果
     */
    @Override
    public int insertCenterLevel(CenterLevel centerLevel)
    {
        return centerLevelMapper.insertCenterLevel(centerLevel);
    }

    /**
     * 修改会员等级设置
     * 
     * @param centerLevel 会员等级设置
     * @return 结果
     */
    @Override
    public int updateCenterLevel(CenterLevel centerLevel)
    {
        return centerLevelMapper.updateCenterLevel(centerLevel);
    }

    /**
     * 批量删除会员等级设置
     * 
     * @param ids 需要删除的会员等级设置ID
     * @return 结果
     */
    @Override
    public int deleteCenterLevelByIds(Long[] ids)
    {
        return centerLevelMapper.deleteCenterLevelByIds(ids);
    }

    /**
     * 删除会员等级设置信息
     * 
     * @param id 会员等级设置ID
     * @return 结果
     */
    @Override
    public int deleteCenterLevelById(Long id)
    {
        return centerLevelMapper.deleteCenterLevelById(id);
    }
}
